
<%@page import="org.zg.library.entity.Users"%>
<%@page import="java.util.List"%>
<%@page import="org.zg.library.dao.impl.UsersDaoImpl"%>
<%@page import="org.zg.library.dao.UsersDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <%  
    	String username="";
    	String userpwd="";
    	String userloc="";
    	String usersex="";
    	String usertel="";
    	int userid=0;
    %>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head> 
  <body>
  	<!-- 通过id查询到的用户信息 -->
  	<% 
	  	Users users = (Users)request.getAttribute("users");
  		if(users==null){
 			if(request.getAttribute("b")=="true"){
		%>
		  	<script>
		  		//经过无数次验证必须回退两次才可以
		  		history.go(-2);
		  		//刷新list界面
		  		/* self.opener.location.reload(); */
    	 	</script>
  		<%
  		}
  	}else{
	  	userid = users.getU_id();
	  	username=users.getU_name();
	  	userpwd=users.getU_pwd();
	  	usersex=users.getU_sex();
	  	usertel=users.getU_tel();
	  	userloc=users.getU_loc();
  	}
  	%>
    <div class="x-body layui-anim layui-anim-up">
        <form class="layui-form" action="UpdateUserServlet" method="post">
          <div class="layui-form-item">
              <label for="L_email" class="layui-form-label">
                  <span class="x-red">*</span>用户名
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="L_email" name="username" required="" lay-verify="email"
                  autocomplete="off" class="layui-input" value="<%=username%>">
              </div>
              <div class="layui-form-mid layui-word-aux">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="L_pass" class="layui-form-label">
                  <span class="x-red">*</span>密码
              </label>
              <div class="layui-input-inline">
                  <input type="password" id="L_pass" name="userpwd" required="" lay-verify="pass"
                  autocomplete="off" class="layui-input" value="<%=userpwd%>">
              </div>
              <div class="layui-form-mid layui-word-aux">
              </div>
          </div>
         	<div class="layui-form-item">
              <label for="L_email" class="layui-form-label">
                  <span class="x-red">*</span>性别
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="L_email" name="usersex" required="" lay-verify="email"
                  autocomplete="off" class="layui-input" value="<%=usersex %>">
              </div>
          </div>
                    <div class="layui-form-item">
              <label for="L_email" class="layui-form-label">
                  <span class="x-red">*</span>电话
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="L_email" name="usertel" required="" lay-verify="email"
                  autocomplete="off" class="layui-input" value="<%=usertel%>">
              </div>
          </div>
                    <div class="layui-form-item">
              <label for="L_email" class="layui-form-label">
                  <span class="x-red">*</span>地址
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="L_email" name="userloc" required="" lay-verify="email"
                  autocomplete="off" class="layui-input" value="<%=userloc%>">
                  <input type="hidden" name="userid" value="<%=userid%>">
              </div>
          </div>
          <div class="layui-form-item">
              <label for="L_repass" class="layui-form-label">
              </label>
              <button  class="layui-btn" type="submit">
                  修改
              </button> 
              <!-- <a href="javascript:history.go(-1)" style="size: 20px">&nbsp;&nbsp;&nbsp;Back</a> -->            
          </div>
      </form>
    </div>
  </body>
</html>